<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>

<div class="row">
	<div class="col-lg-10 offset-lg-1">
		<div class="card">
		<div class="card-body">
			<form action="<?php echo url("plugin-setting-sg_group");?>" method="post" id="form">
				<h4 class="card-title">用户组升级增强版  设置</h4>
				<div class="form-group row">
					<label class="col-sm-2 form-control-label">升级公式：</label>
					<div class="col-sm-3">
						<?php echo $input['group1']; ?>
					</div>
				</div><div class="form-group row">
					<label class="col-sm-2 form-control-label">发帖所得积分：</label>
					<div class="col-sm-3">
						<?php echo $input['group2']; ?>
					</div><font  class="text-small" color="#FF0000">分数可以为负数，即发帖减积分</font>
				</div><div class="form-group row">
					<label class="col-sm-2 form-control-label">回帖所得积分：</label>
					<div class="col-sm-3">
						<?php echo $input['group3']; ?>
					</div><font  class="text-small" color="#FF0000">分数可以为负数，即发帖减积分</font>
				</div><div class="form-group row">
					<label class="col-sm-2 form-control-label">开启每日首帖：</label>
					<div class="col-sm-3">
						<?php echo $input['group4']; ?>
					</div><font  class="text-small" color="#FF0000">开启/关闭每日首帖奖励</font>
				</div><div class="form-group row">
					<label class="col-sm-2 form-control-label">每日首帖奖励：</label>
					<div class="col-sm-3">
						<?php echo $input['group5']; ?>
					</div>
					<div class="col-sm-3">
						<?php echo $input['group6']; ?>
					</div><font  class="text-small" color="#FF0000">随机奖励，设置最小和最大值</font>
				</div><div class="form-group row">
					<label class="col-sm-2 form-control-label"></label>
					<div class="col-sm-10">
						<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
						<a role="button" class="btn btn-secondary btn-block m-t-1" href="javascript:history.back();"><?php echo lang('back');?></a>
					</div>
				</div>
			</form>
			<p class="text-small text-muted">用户组升级增强版 插件为<a target='_blank' href='http://cha.sgahz.net/'>查鸽信息网</a>制作。 联系QQ：5886425</p>
		</div>
		</div>
	</div>
</div>

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>

<script>

var jform = $("#form");
var jsubmit = $("#submit");
var referer = '<?php echo url("plugin-setting-sg_group");?>';
jform.on('submit', function(){
	jform.reset();
	jsubmit.button('loading');
	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(2000).button('reset').location(referer);
			return;
		} else {
			$.alert(message);
			jsubmit.button('reset');
		}
	});
	return false;
});

</script>